<include file="public@header"/>
<style>
.control3{
    display:inline;
    width:300px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#A" data-toggle="tab">{:lang('WEB_SITE_INFOS')}</a></li>
        <li><a href="#B" data-toggle="tab">{:lang('SEO_SETTING')}</a></li>

    


    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('setting/sitePost')}"
          method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-maintain_switch" class="col-sm-2 control-label">网站维护</label>
                            <div class="col-md-6 col-sm-10">
                                <select class="form-control" name="options[maintain_switch]">
                                    <option value="0">关闭</option>
                                    <option value="1" <eq name="site_info['maintain_switch']" value="1">selected</eq>>开启</option>
                                </select>
                                <p class="help-block">网站维护开启后，无法开启直播，进入直播间</p>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-maintain_tips" class="col-sm-2 control-label">维护提示</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-maintain_tips" name="options[maintain_tips]" >{$site_info.maintain_tips|default=''}</textarea>
                                <p class="help-block">维护提示信息（200字以内）</p>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-company_name" class="col-sm-2 control-label">公司名称</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-company_name" name="options[company_name]"
                                       value="{$site_info.company_name|default=''}">
                                       <p class="help-block">公司名称(网站下载页关于我们使用)</p>
                            </div>
                        </div>

                        <div class="form-group">
                            <label  for="input-company_desc" class="col-sm-2 control-label">公司简介</label>
                            <div class="col-md-6 col-sm-10">        
                                <textarea  class="form-control" name="options[company_desc]">{$site_info['company_desc']|default=''}</textarea>
                                <p class="help-block">公司简介（网站下载页关于我们使用,字数在200字以内）</p>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label"><span
                                    class="form-required"></span>{:lang('WEBSITE_NAME')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-name" name="options[site_name]"
                                       value="{$site_info.site_name|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site" class="col-sm-2 control-label"><span
                                    class="form-required"></span>网站域名</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-name" name="options[site]" value="{$site_info.site|default=''}">
                                <p class="help-block">格式： http(s)://xxxx.com(:端口号)</p>
                            </div> 
                        </div>
                        <div class="form-group" style="display:none;">
                            <label for="input-admin_url_password" class="col-sm-2 control-label">
                                后台加密码
                                <a href="http://www.thinkcmf.com/faq.html?url=https://www.kancloud.cn/thinkcmf/faq/493509"
                                   title="查看帮助手册"
                                   data-toggle="tooltip"
                                   target="_blank"><i class="fa fa-question-circle"></i></a>
                            </label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-admin_url_password"
                                       name="admin_settings[admin_password]"
                                       value="{$admin_settings.admin_password|default=''}"
                                       id="js-site-admin-url-password">
                                <p class="help-block">英文字母数字，不能为纯数字</p>
                                <p class="help-block" style="color: red;">
                                    设置加密码后必须通过以下地址访问后台,请劳记此地址，为了安全，您也可以定期更换此加密码!</p>
                                <php>
                                    $root=cmf_get_root();
                                    $root=empty($root)?'':'/'.$root;
                                    $site_domain = cmf_get_domain().$root;
                                </php>
                                <p class="help-block">后台登录地址：<span id="js-site-admin-url">{$site_domain}/{$admin_settings.admin_password|default='admin'}</span>
                                </p>
                            </div>
                        </div>

                        <div class="form-group" style="display:none;">
                            <label for="input-site_admin_theme" class="col-sm-2 control-label">后台模板</label>
                            <div class="col-md-6 col-sm-10">
                                <php>
                                    $site_admin_theme=empty($admin_settings['admin_theme'])?'':$admin_settings['admin_theme'];
                                </php>
                                <select class="form-control" name="admin_settings[admin_theme]"
                                        id="input-site_admin_theme">
                                    <foreach name="admin_themes" item="vo">
                                        <php>$admin_theme_selected = $site_admin_theme == $vo ? "selected" : "";</php>
                                        <option value="{$vo}" {$admin_theme_selected}>{$vo}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" style="display:none;">
                            <label for="input-site_adminstyle" class="col-sm-2 control-label">{:lang('WEBSITE_ADMIN_THEME')}</label>
                            <div class="col-md-6 col-sm-10">
                                <php>
                                    $site_admin_style=empty($admin_settings['admin_style'])?cmf_get_admin_style():$admin_settings['admin_style'];
                                </php>
                                <select class="form-control" name="admin_settings[admin_style]"
                                        id="input-site_adminstyle">
                                    <foreach name="admin_styles" item="vo">
                                        <php>$admin_style_selected = $site_admin_style == $vo ? "selected" : "";</php>
                                        <option value="{$vo}" {$admin_style_selected}>{$vo}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <if condition="APP_DEBUG && false">
                            <div class="form-group">
                                <label for="input-default_app" class="col-sm-2 control-label">默认应用</label>
                                <div class="col-md-6 col-sm-10">
                                    <php>
                                        $site_default_app=empty($cmf_settings['default_app'])?'demo':$cmf_settings['default_app'];
                                    </php>
                                    <select class="form-control" name="cmf_settings[default_app]"
                                            id="input-default_app">
                                        <foreach name="apps" item="vo">
                                            <php>$default_app_selected = $site_default_app == $vo ? "selected" : "";
                                            </php>
                                            <option value="{$vo}" {$default_app_selected}>{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                        </if>
                        <!--
                        <div class="form-group">
                            <label for="input-html_cache_on" class="col-sm-2 control-label">{:lang('HTML_CACHE')}</label>
                            <div class="col-md-6 col-sm-10">
                                <php>$html_cache_on_checked=empty($html_cache_on)?'':'checked';</php>
                                <div class="checkbox">
                                    <label><input type="checkbox" name="options[mobile_tpl_enabled]" value="1" id="input-html_cache_on" {$html_cache_on_checked}></label>
                                </div>
                            </div>
                        </div>
                        -->
                        <div class="form-group">
                            <label for="input-copyright" class="col-sm-2 control-label">版权信息</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-copyright" name="options[copyright]" >{$site_info.copyright|default=''}</textarea>
                                <p class="help-block">版权信息（200字以内）</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-name_coin" class="col-sm-2 control-label">钻石名称</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-name_coin" name="options[name_coin]"
                                       value="{$site_info.name_coin|default=''}"> 
                                       <p class="help-block">用户充值得到的虚拟币名称</p>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-name_score" class="col-sm-2 control-label">积分名称</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-name_score" name="options[name_score]"
                                       value="{$site_info.name_score|default=''}">
                                       <p class="help-block">直播间玩游戏得到的虚拟币名称</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-name_votes" class="col-sm-2 control-label">映票名称</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-name_votes"
                                       name="options[name_votes]"
                                       value="{$site_info.name_votes|default=''}">
                                       <p class="help-block">主播获得的虚拟票名称</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-mobile" class="col-sm-2 control-label">公司电话</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-mobile"
                                       name="options[mobile]"
                                       value="{$site_info.mobile|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-address" class="col-sm-2 control-label">公司地址</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-address"
                                       name="options[address]"
                                       value="{$site_info.address|default=''}">
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-apk_ewm" class="col-sm-2 control-label">android版下载二维码</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[apk_ewm]" id="thumbnail1" value="{$site_info['apk_ewm']|default=''}">
                                <input type="hidden" name="options[apk_ewm_old]" value="{$site_info['apk_ewm']|default=''}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail1');">
                                    <if condition="empty($site_info.apk_ewm)">
                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail1-preview"
                                             style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    <else/>
                                    <img src="{:cmf_get_image_preview_url($site_info.apk_ewm)}"
                                         id="thumbnail1-preview"
                                         style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    </if>
                                </a>
                                <input type="button" class="btn btn-sm btn-cancel-thumbnail1" value="取消图片">  PC首页用
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-ipa_ewm" class="col-sm-2 control-label">iPhone版下载二维码</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[ipa_ewm]" id="thumbnail2" value="{$site_info['ipa_ewm']|default=''}">
                                <input type="hidden" name="options[ipa_ewm_old]" value="{$site_info['ipa_ewm']|default=''}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail2');">
                                    <if condition="empty($site_info.ipa_ewm)">
                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail2-preview"
                                             style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    <else/>
                                    <img src="{:cmf_get_image_preview_url($site_info.ipa_ewm)}"
                                         id="thumbnail2-preview"
                                         style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    </if>
                                </a>
                                <input type="button" class="btn btn-sm btn-cancel-thumbnail2" value="取消图片">  PC首页用
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label for="input-wechat_ewm" class="col-sm-2 control-label">微信公众号</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[wechat_ewm]" id="thumbnail3" value="{$site_info['wechat_ewm']|default=''}">
                                <input type="hidden" name="options[wechat_ewm_old]"  value="{$site_info['wechat_ewm']|default=''}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail3');">
                                    <if condition="empty($site_info.wechat_ewm)">
                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail3-preview"
                                             style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    <else/>
                                    <img src="{:cmf_get_image_preview_url($site_info.wechat_ewm)}"
                                         id="thumbnail3-preview"
                                         style="cursor: pointer;max-width:150px;max-height:150px;"/>
                                    </if>
                                </a>
                                <input type="button" class="btn btn-sm btn-cancel-thumbnail3" value="取消图片"> 首页使用 建议尺寸  200 X 200
                            </div>
                        </div>



                        
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="1">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="B">
                        <div class="form-group">
                            <label for="input-site_seo_title" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_TITLE')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_seo_title"
                                       name="options[site_seo_title]" value="{$site_info.site_seo_title|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_seo_keywords" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_KEYWORDS')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_seo_keywords"
                                       name="options[site_seo_keywords]"
                                       value="{$site_info.site_seo_keywords|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_seo_description" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_DESCRIPTION')}</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-site_seo_description"
                                          name="options[site_seo_description]">{$site_info.site_seo_description|default=''}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    (function(){
        $('.btn-cancel-thumbnail1').click(function () {
            $('#thumbnail1-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail1').val('');
        });
        
        $('.btn-cancel-thumbnail2').click(function () {
            $('#thumbnail2-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail2').val('');
        });
        
        $('.btn-cancel-thumbnail3').click(function () {
            $('#thumbnail3-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail3').val('');
        });
        
        $('.btn-cancel-thumbnail4').click(function () {
            $('#thumbnail4-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail4').val('');
        });
        
        $('.btn-cancel-thumbnail5').click(function () {
            $('#thumbnail5-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail5').val('');
        });
        
        $('.btn-cancel-thumbnail6').click(function () {
            $('#thumbnail6-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail6').val('');
        });
        
    })()

</script>
</body>
</html>
